import request from '@/utils/request'

// 查询问卷调查列表
export function list(query) {
  return request({
    url: '/comprehensive/questionnaire/list',
    method: 'get',
    params: query
  })
}

// 查询问卷调查详细
export function get(id) {
  return request({
    url: '/comprehensive/questionnaire/' + id,
    method: 'get'
  })
}

// 新增问卷调查
export function add(data) {
  return request({
    url: '/comprehensive/questionnaire/add',
    method: 'post',
    data: data
  })
}

// 修改问卷调查
export function update(data) {
  return request({
    url: '/comprehensive/questionnaire/update',
    method: 'post',
    data: data
  })
}

// 删除问卷调查
export function del(id) {
  return request({
    url: '/comprehensive/questionnaire/' + id,
    method: 'post'
  })
}


export function saveAndRelease(data) {
  return request({
    url: '/comprehensive/questionnaire/saveAndRelease',
    method: 'post',
    data: data
  })
}

export function releaseNew(data) {
  return request({
    url: '/comprehensive/questionnaire/releaseNew',
    method: 'post',
    data: data
  })
}

export function releaseStop(data) {
  return request({
    url: '/comprehensive/questionnaire/releaseStop',
    method: 'post',
    data: data
  })
}